﻿<Window x:Class="Convertor.LoadConfigWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:sm="clr-namespace:Wpf.CommonTools.SystemExtension;assembly=Wpf.CommonTools"
        TextOptions.TextFormattingMode="Display"
        Title="{DynamicResource PuglinSetting}"
        Width="500"
        Height="500"
        ShowInTaskbar="True"
        ResizeMode="NoResize" 
        Loaded="Window_Loaded_1"
        Icon="Images/logo256.ico"
        WindowStartupLocation="CenterOwner"
        SizeToContent="WidthAndHeight"
        KeyDown="Window_KeyDown"
        KeyUp="Window_KeyUp">
    <Window.Resources>
    </Window.Resources>
    <Window.Background>
        <ImageBrush ImageSource="Images/Bg-1.png"/>
    </Window.Background>
    <Grid x:Name="grid" Background="{StaticResource MainBackgroundOpacityMask}">
        <Grid.RowDefinitions>
            <RowDefinition/>
            <RowDefinition Height="45"/>
        </Grid.RowDefinitions>
        <DockPanel Grid.Row="0" Background="#88F5F3F3">
            <Border DockPanel.Dock="Top" Style="{StaticResource BorderShadowStyle}" Margin="5,15">
                <ScrollViewer  VerticalScrollBarVisibility="Auto">
                    <DockPanel Name="PluginLoader" LastChildFill="True">
                    </DockPanel>
                </ScrollViewer>
            </Border>
            <Border Name="testLoader" DockPanel.Dock="Top" Style="{StaticResource BorderShadowStyle}" Margin="5" Padding="10">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="10"/>
                        <RowDefinition/>
                        <RowDefinition Height="30"/>
                        <RowDefinition/>
                    </Grid.RowDefinitions>
                    <AdornerDecorator Grid.Row="1" >
                            <TextBox Name="tbInput" AcceptsReturn="True" AcceptsTab="True" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto">
                                <sm:WatermarkService.Titlemark>
                                    <TextBlock Text="{DynamicResource InputContent}" TextAlignment="Right" VerticalAlignment="Bottom" Margin="0,0,20,20"></TextBlock>
                                </sm:WatermarkService.Titlemark>
                            </TextBox>
                    </AdornerDecorator>
                    <AdornerDecorator Grid.Row="3">
                            <TextBox Name="tbOutput" AcceptsReturn="True" AcceptsTab="True" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto">
                                <sm:WatermarkService.Titlemark>
                                    <TextBlock Text="{DynamicResource OutputContent}" TextAlignment="Right" VerticalAlignment="Bottom" Margin="0,0,20,20"></TextBlock>
                                </sm:WatermarkService.Titlemark>
                            </TextBox>
                    </AdornerDecorator>
                    <Button Content="▼" Grid.Row="2" HorizontalAlignment="Center" VerticalAlignment="Stretch" Click="Button_Test_Click"  BorderThickness="0" Margin="0,5,0,0"/>
                </Grid>
            </Border>
            <DockPanel Name="memoLoader" DockPanel.Dock="Top" Visibility="Collapsed">
                <AdornerDecorator>
                    <TextBox Margin="0,5,0,0" MinHeight="150" Text="{Binding Path=PluginContent.Memo, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Window}}}">
                        <sm:WatermarkService.Titlemark>
                            <TextBlock Text="{DynamicResource Memo}" TextAlignment="Right" VerticalAlignment="Bottom" Margin="0,0,20,20"></TextBlock>
                        </sm:WatermarkService.Titlemark>
                    </TextBox>
                </AdornerDecorator>
            </DockPanel>
        </DockPanel>
        <Border Grid.Row="1" Style="{StaticResource WhiteMask}">
            <WrapPanel  HorizontalAlignment="Center" VerticalAlignment="Center" Margin="5">
                <Button Click="Button_OK_Click" Padding="14,3,14,3">
                    <Button.Content>
                        <WrapPanel>
                            <Image Source="Images/ButtonOK.png" Margin="0,0,3,0" Width="16"/>
                            <TextBlock Text="{DynamicResource OK}"/>
                        </WrapPanel>
                    </Button.Content>
                </Button>
                <Button Click="Button_Cancel_Click" Padding="14,3,14,3">
                    <Button.Content>
                        <WrapPanel>
                            <Image Source="Images/ButtonCancel.png" Margin="0,0,3,0" Width="16"/>
                            <TextBlock Text="{DynamicResource MenuCancel}"/>
                        </WrapPanel>
                    </Button.Content>
                </Button>
                <Button Name="btOpenTest" Click="Button_OpenTest_Click" Padding="10,3">
                    <WrapPanel>
                        <TextBlock Text="{DynamicResource Test}" Margin="7,0,0,0"/>
                        <Image Source="Images/Up.png" RenderTransformOrigin="0.5,0.5" Margin="3,3,-5,3">
                            <Image.RenderTransform>
                                <RotateTransform Angle="180"/>
                            </Image.RenderTransform>
                        </Image>
                    </WrapPanel>
                </Button>
                <Button Click="Button_OpenMemo_Click" Padding="10,3">
                    <WrapPanel>
                        <TextBlock Text="{DynamicResource Memo}" Margin="7,0,0,0"/>
                        <Image Source="Images/Up.png" RenderTransformOrigin="0.5,0.5" Margin="3,3,-5,3">
                            <Image.RenderTransform>
                                <RotateTransform Angle="180"/>
                            </Image.RenderTransform>
                        </Image>
                    </WrapPanel>
                </Button>
            </WrapPanel>
        </Border>
    </Grid>
</Window>
